<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Title</title>

</head>
<body>
    <form id="login_form">
        <input type="text" id="username" value="admin"> <br>
        <input type="email" id="email">
        <button type="button" id="btn_login">login</button>
    </form>

    <!--    引入jquery框架-->
    <script src="/boot/plugins/jquery/jquery.min.js"></script>
    <script>
        //$(function(){  ...  })
        //等到所有的dom标签全部加载完毕之后才会执行.
        $(function(){
            //根据id属性的值来获取文本框中的数据
            //1. js的方式
            //①先根据id获取到这个dom元素(标签)
            //获取input对象
            //let input_username = document.getElementById("username");
            //console.log(input_username)

            //通过对象.属性来获取值
            //let username = input_username.value;
            //console.log(username);

            //2. jquery方式
            let username = $("#username").val();
            console.log(username)
        })
    </script>
</body>
</html>